import dt from '@dt/dt'
import buildingApi from '@/config/server/api/building.js'

function detail() {
  return buildingApi.contract.detail.fetch({
    housesId: dt.buildInfo().housesId
  })
}

function saveContract(info) {
  info.housesId = dt.buildInfo().housesId
  return buildingApi.contract.saveContract.fetch(info)
}

function saveWithdrawal(info) {
  info.housesId = dt.buildInfo().housesId
  return buildingApi.contract.saveWithdrawal.fetch(info)
}

function collectList(info) {
  return buildingApi.contract.collectList.fetch(info)
}

function collectExport(info) {
  return buildingApi.contract.collectExport.fetch(info)
}

export default {
  detail,
  saveContract,
  saveWithdrawal,
  collectList,
  collectExport
}